package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.HolidayDao;
import com.hera.process.config.domain.Holiday;
import com.hera.process.config.service.HolidayService;

@Service("holidayservice")
public class HolidayServiceImpl implements HolidayService {

	static final Logger logger = Logger.getLogger(UserServiceImpl.class);
	
	@Autowired
	private HolidayDao	holidaydao;
	
	@Override
	public Holiday findById(Long id) {
		
		return holidaydao.findOne(id);
	}

	@Override
	public void update(Holiday entity) {
		
		holidaydao.save(entity);
	}

	@Override
	public void save(Holiday entity) {
		
		holidaydao.save(entity);
	}

	@Override
	public void delete(Holiday entity) {
		
		holidaydao.delete(entity);
	}

	@Override
	public List<Holiday> findAll() {
		
		return holidaydao.findAll();
	}

	@Override
	public List<Holiday> findAll(FiltroDTO filtroDTO) {
		
		return holidaydao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
